package com.cskaoyan.mall.pay.converter;

import com.cskaoyan.mall.pay.dal.entitys.Payment;
import com.cskaoyan.mall.pay.form.PaymentRequest;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

/**
 *
 * @since 2022/08/27 14:29
 * @author sunxuJ
 */
@Mapper(componentModel = "spring")
public interface PaymentConverter {


    @Mapping(source = "userId",target = "payerUid")
    @Mapping(source = "nickName",target = "payerName")
    @Mapping(source = "info",target = "productName")
    @Mapping(source = "money",target = "orderAmount")
    @Mapping(source = "payType",target = "payWay")
    Payment paymentRequest2Payment(PaymentRequest paymentRequest);
}
